<tagLib name="cx" />
<include file="Public:header" />
<div class="span-24 last">
    <include file="Public:menu" />
    <div class="span-19 last">
        <switch name="ACTION_NAME">
            <case value="add">
                <h4>添加活动</h4>
                <form name="proform" method="post" action="__URL__/doadd" enctype="multipart/form-data">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>活动名称</th>
                            <td><input type="text" name="title" value=""  /><input type="hidden" name="uid" value="{$uid}"/></td>
                        </tr>
                        <tr>
                            <th>活动类别</th>
                            <td>
                                <select name="id" >
                                    <volist name="cats" id="c">
                                        <option value="{$c.id}">{$c.title}</option>
                                    </volist>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>活动型号</th>
                            <td><input type="text" name="pattern" value=""  /></td>
                        </tr>
                        <tr>
                            <th>活动图片</th>
                            <td><input type="file"  name="attachment" value="" ></td>
                        </tr>
                        <tr>
                            <th>活动介绍</th>
                            <td><html:editor id="editor" name="content" type="FCKeditor" content="" /></td>
                        </tr>
                        <tr>
                            <th>其他参数</th>
                            <td><textarea name="parameters" class="input-textarea"></textarea></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <case value="edit">
                <h4>编辑活动</h4>
                <form name="proform" method="post" action="__URL__/doedit" enctype="multipart/form-data">
                    <table border="0" cellspacing="1" >
                        <tr>
                            <th>ID</th>
                            <td>{$id}<input type="hidden" name="id" value="{$id}"></td>
                        </tr>
                        <tr>
                            <th>活动名称</th>
                            <td><input type="text" name="title" value="{$title}"  /></td>
                        </tr>
                        <tr>
                            <th>活动类别</th>
                            <td>
                                <select name="id" id="id">
                                    <volist name="cats" id="data"  >
                                        <option value="{$key}" <if condition="$key eq $id "> selected="selected" </if>>{$data}</option>
                                    </volist>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th>活动型号</th>
                            <td><input type="text" name="pattern" value="{$pattern}"  /></td>
                        </tr>
                        <tr>
                            <th>活动图片</th>
                            <td><input type="file"  name="attachment" value="{$attachment}" /> 当前图片：<a href="#" onmouseover="tooltip.show('<img src={$attachment|getProImg = ###} height=160 />');" onmouseout=tooltip.hide(); >{$attachment}</a></td>
                        </tr>
                        <tr>
                            <th>活动介绍</th>
                            <td><html:editor id="editor" name="content" type="FCKeditor" content="{$content}" /></td>
                        </tr>
                        <tr>
                            <th>其他参数</th>
                            <td><textarea name="parameters" class="input-textarea">{$parameters|str_replace = "<br />","",###}</textarea></td>
                        </tr>
                        <tr>
                            <th>发布时间</th>
                            <td><input type="text" name="postdate" value="{$postdate|date='Y-n-j H:i:s',###}"  /></td>
                        </tr>
                    </table>
                    <div align="center"><input type="submit" value="提交"  /></div>
                </form>
            </case>
            <default />
          <form name="search" method="post" action="__URL__">
        <input type="text" name="keyword" value="{$keyword}" />
        <input type="submit" value="搜索" />
    </form>
            <form name="proform" method="post" action="__URL__/batch">
                <table width="100%" border="0" cellspacing="1" >
                    <tr>
                        <th width="20"><input name="checkbox" type="checkbox"  onClick="selAll(this)" /></th>
                        <th width="30">ID</th>
                        <th>活动名称</th>
                        <th>发布时间</th>
                        <th>所属分类</th>
                        <th width="150">操作</th>
                    </tr>
                    <volist name="Activity" id="p">
                        <tr>
                            <td><input name="id[]" type="checkbox" id="id[]" value="{$p.id}"  /></td>
                            <td>{$p.id}</td>
                            <td><a href="__URL__/edit/id/{$p.id}">{$p.title}</a></td>
                            <td><a href="__URL__/edit/id/{$p.id}">{$p.posttime|date="Y-n-j H:i:s",###}</a></td>
                            <td>{$p.catename}</td>
                            <td><a href="__URL__/edit/id/{$p.id}">编辑</a> <a href="__URL__/batch/act/delete/id/{$p.id}">删除</a> <a href="__URL__/verify/id/{$p.id}">审核</a></td>
                        </tr>
                    </volist>
                </table>
                <input name="act" type="radio" value="delete" />删除
                <input name="act" type="radio" value="remove" />移动
                <select name="category" id="category">
                    <volist name="cats" id="data"  >
                        <option value="{$key}">{$data}</option>
                    </volist>
                </select>
                <input type="submit" value="提交"  />
            </form>
            <include file="Public:paging" />
        </switch>
    </div>
    <div class="clear"></div>
</div>
<include file="Public:footer" />